(global.webpackJsonp = global.webpackJsonp || []).push([ [ "xg_o2o/order/order" ], {
    1152: function(e, t, r) {
        "use strict";
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            r("4e1e"), t(r("66fd")), e(t(r("e6d5")).default);
        }).call(this, r("543d").createPage);
    },
    "211d": function(e, t, r) {
        "use strict";
        r.d(t, "b", function() {
            return a;
        }), r.d(t, "c", function() {
            return o;
        }), r.d(t, "a", function() {
            return n;
        });
        var n = {
            gracePage: function() {
                return r.e("graceUI/components/gracePage").then(r.bind(null, "1915"));
            },
            graceFullLoading: function() {
                return r.e("graceUI/components/graceFullLoading").then(r.bind(null, "7669"));
            },
            graceEmptyNew: function() {
                return r.e("graceUI/components/graceEmptyNew").then(r.bind(null, "fb2f"));
            },
            divider: function() {
                return r.e("components/divider/divider").then(r.bind(null, "bdb7"));
            },
            graceLoading: function() {
                return r.e("graceUI/components/graceLoading").then(r.bind(null, "93a5"));
            },
            xmgTabBar: function() {
                return r.e("components/xmgTabBar/xmgTabBar").then(r.bind(null, "cfe5"));
            }
        }, a = function() {
            var e = this, t = (e.$createElement, e._self._c, 0 !== e.menuList.length ? e.__map(e.orderItemList, function(t, r) {
                return {
                    $orig: e.__get_orig(t),
                    l0: e.__map(t, function(t, r) {
                        return {
                            $orig: e.__get_orig(t),
                            m0: e.dateToStr(t[t.status.status_time.time])
                        };
                    })
                };
            }) : null), r = Object.keys(e.tabBar);
            e.$mp.data = Object.assign({}, {
                $root: {
                    l1: t,
                    g0: r
                }
            });
        }, o = [];
    },
    bccb: function(e, t, r) {
        "use strict";
        r.r(t);
        var n = r("c9f6"), a = r.n(n);
        for (var o in n) "default" !== o && function(e) {
            r.d(t, e, function() {
                return n[e];
            });
        }(o);
        t.default = a.a;
    },
    c9f6: function(e, t, r) {
        "use strict";
        (function(e) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var n = r("7825"), a = {
                data: function() {
                    return {
                        bgColor: "",
                        textColor: "",
                        releaseColor: "linear-gradient(to right, #FFCD00,#FF9B00)",
                        graceFullLoading: !0,
                        menuList: [],
                        bottomColor: "",
                        orderItemList: [ 0 ],
                        scrollLeft: "c0",
                        tabCurrentIndex: 0,
                        attach: "",
                        productList: [],
                        loadingData: [],
                        ordernum: 0,
                        tempItem: [],
                        clickNum: [],
                        page: [],
                        pageMore: [],
                        tempPageMore: 0,
                        userWxInfo: {},
                        topayservice: "去确认",
                        isRelease: 2,
                        iskefu: 2,
                        showBack: !1,
                        cardName: "次卡",
                        tabBar: {},
                        currentCur: 0,
                        loadSTatus: 1
                    };
                },
                onLoad: function(t) {
                    e.removeStorageSync("touser");
                    var r = getCurrentPages();
                    this.showBack = r.length > 1, t.ordernum && (this.tabCurrentIndex = t.ordernum, 
                    this.ordernum = t.ordernum), this.getOrderMenu();
                },
                onShow: function() {
                    1 == e.getStorageSync("touser") && (e.removeStorageSync("touser"), this.graceFullLoading = !0, 
                    this.tabCurrentIndex = 0, this.ordernum = 0, console.log("1"), this.getOrderMenu());
                },
                methods: {
                    tabClick: function(e) {
                        this.tabCurrentIndex = e.currentTarget.dataset.cindex;
                    },
                    changeTab: function(e) {
                        this.tabCurrentIndex = e.target.current;
                        var t = e.target.current;
                        this.scrollLeft = "c" + t, 0 == this.clickNum[t] && this.loadData(t, 1);
                    },
                    getOrderMenu: function() {
                        var e = this, t = this.$xSign.sign("u9order");
                        this.$xRequest.request({
                            url: "entry/wxapp/u9order",
                            data: {
                                xgsign: t
                            },
                            success: function(t) {
                                e.graceFullLoading = !1;
                                var r = JSON.parse(e.$Decrypt(t.data.data));
                                0 == t.data.errno && (e.attach = r.attach, e.bgColor = r.bgColor, e.textColor = r.textColor, 
                                e.bottomColor = r.color, e.menuList = r.menu, e.orderItemList = r.orderItemList, 
                                e.clickNum = r.clicknum, e.page = r.page, e.loadingData = r.loadType, e.pageMore = r.pageMore, 
                                e.attach = r.attach, e.isRelease = r.isrelease, e.scrollLeft = "c" + e.ordernum, 
                                e.iskefu = r.iskefu, e.cardName = r.cardname, e.tabBar = r.tabbar, e.currentCur = r.currentCur, 
                                e.loadData(e.ordernum, 1));
                            }
                        });
                    },
                    loadData: function(t, r) {
                        var n = this, a = 1e3;
                        1 == r ? (a = 100, this.graceFullLoading = !0) : e.showLoading({
                            title: "数据加载中",
                            mask: !0
                        }), setTimeout(function() {
                            var a = n.menuList[t].status;
                            if (1 == n.pageMore[n.tabCurrentIndex]) return n.graceFullLoading = !1, e.hideLoading(), 
                            !1;
                            var o = n.$xSign.sign("v4order_more");
                            n.$xRequest.request({
                                url: "entry/wxapp/v4order_more",
                                data: {
                                    page: n.page[t],
                                    status: a,
                                    xgsign: o
                                },
                                success: function(a) {
                                    1 == r && (n.graceFullLoading = !1), e.hideLoading();
                                    var o = JSON.parse(n.$Decrypt(a.data.data));
                                    0 == o.info ? o.itemlist && (o.itemlist, n.tempItem = n.orderItemList[t].concat(o.itemlist), 
                                    n.orderItemList[t] = n.tempItem, n.orderItemList[n.tabCurrentIndex].length >= o.total ? (console.log("停止加载"), 
                                    n.pageMore[n.tabCurrentIndex] = 1, n.loadingData.splice(n.tabCurrentIndex, 1, 2)) : (console.log("继续加载"), 
                                    n.pageMore[n.tabCurrentIndex] = 2, n.loadingData.splice(n.tabCurrentIndex, 1, 0), 
                                    n.clickNum[n.tabCurrentIndex]++, n.page[n.tabCurrentIndex]++)) : (n.tempPageMore = o.info, 
                                    n.pageMore[n.tabCurrentIndex] = 1, n.loadingData.splice(n.tabCurrentIndex, 1, 2));
                                }
                            });
                        }, a);
                    },
                    toPay: function(t, r) {
                        e.navigateTo({
                            url: "/xg_o2o/confirm/confirm?oid=" + t
                        });
                    },
                    toDetail: function(t) {
                        e.navigateTo({
                            url: "/xg_o2o/order/orderdetail?oid=" + t
                        });
                    },
                    copyId: function(t) {
                        e.setClipboardData({
                            data: t,
                            success: function() {
                                console.log("success");
                            }
                        });
                    },
                    dateToStr: function(e) {
                        var t = 1e3 * parseInt(e), r = new Date(t), n = r.getFullYear(), a = r.getMonth() + 1, o = r.getDate(), i = r.getHours(), u = r.getMinutes();
                        return r.getSeconds(), n + "-" + (String(a).length > 1 ? a : "0" + a) + "-" + (String(o).length > 1 ? o : "0" + o) + " " + (String(i).length > 1 ? i : "0" + i) + ":" + (String(u).length > 1 ? u : "0" + u);
                    }
                },
                computed: {
                    style: function() {
                        var t = n.info(), r = t.windowHeight - t.iPhoneXBottomHeightPx - t.statusBarHeight - 45 - e.upx2px(170);
                        return "height:".concat(r, "px;");
                    }
                }
            };
            t.default = a;
        }).call(this, r("543d").default);
    },
    e6d5: function(e, t, r) {
        "use strict";
        r.r(t);
        var n = r("211d"), a = r("bccb");
        for (var o in a) "default" !== o && function(e) {
            r.d(t, e, function() {
                return a[e];
            });
        }(o);
        var i = r("f0c5"), u = Object(i.a)(a.default, n.b, n.c, !1, null, null, null, !1, n.a, void 0);
        t.default = u.exports;
    }
}, [ [ "1152", "common/runtime", "common/vendor" ] ] ]);